package com.zxy.employee.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zxy.base.entity.BaseEntity;
import com.zxy.employee.excel.EmployStatusConverter;
import com.zxy.employee.excel.GenderConverter;
import com.zxy.employee.excel.MarryStatusConverter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("tb_demo_employee")
public class EmployeeEntity extends BaseEntity {


    @TableId(type = IdType.AUTO)
    private Integer employeeId;


    @NotBlank(message = "员工名不为空")
    private String employeeName;

    @NotNull(message = "性别不为空")
    private Boolean  gender;


    private Integer deptId;

    @NotNull(message = "员工状态不为空")
    private Boolean employStatus;

    @NotBlank(message = "手机号不为空")
    private String phone;

    @NotBlank(message = "身份证号不为空")
    private String idCard;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate birthday;


    private Boolean employeeMarryStatus;


    private String email;


    private String address;


    private String hobby;


    private String remark;
}
